﻿
using pdt.dal;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace pdt.bll
{
    public class CategroyService
    {
        ProdbDataContext db = new ProdbDataContext();

        public object btn1(int value)
        {
            List<Product> product = null;
            if (value == 1)
            {
                product = (from pro in db.Product
                            where pro.c_id == 1
                            select pro).ToList();
            }
            if (value == 2)
            {
                product = (from pro in db.Product
                           where pro.c_id == 2
                           select pro).ToList();
            }
            if (value == 3)
            {
                product = (from pro in db.Product
                           where pro.c_id == 3
                           select pro).ToList();
            }
            return product;
        }
    }
}